package com.windoent.yugioh.adapter;

import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.windoent.yugioh.R;
import com.windoent.yugioh.bean.DrawaerLayoutListBean;

/**
 * author : robert
 * date   : 2021/5/6 15:26
 * desc   :
 */
public class ShareQqWechatAdapter extends BaseQuickAdapter<DrawaerLayoutListBean, BaseViewHolder> {

    public ShareQqWechatAdapter() {
        super(R.layout.item_share_qq_wechat, null);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, DrawaerLayoutListBean item) {
        helper.setText(R.id.tv_name, item.getName());
        ImageView imageView = helper.getView(R.id.image);
        imageView.setBackgroundResource(item.getResId());
    }
}